1. Technical Field
The present invention relates to an improved data processing system and, in particular, to a method and apparatus for managing world wide web documents in a data processing system. Still more particularly, the present invention provides a method and apparatus for performing actions on selected portions of web documents and displaying the location of page breaks within a web browser in a data processing system.
2. Description of Related Art
The worldwide network of computers commonly known as the “Internet” has seen explosive growth in the last several years. Mainly, this growth has been fueled by the introduction and widespread use of so-called “web browsers,” which enable simple graphical user interface-based access to network servers, which support documents formatted as so-called “web pages.” These web pages are versatile and customized by authors. For example, web pages may mix text and graphic images. A web page also may include fonts of varying sizes. A browser is a program that is executed on a graphical user interface (GUI). The browser allows a user to seamlessly load documents from the Internet and display them by means of the GUI. These documents are commonly formatted using markup language protocols, such as hypertext markup language (HTML). Portions of text and images within a document are delimited by indicators, which affect the format for display. In HTML documents, the indicators are referred to as tags. The browser gives some means of viewing the contents of web pages (or nodes) and of navigating from one web page to another.
The versatility and customization of web pages, however, is sometimes an impediment to user generating hard copies of the documents. Popular web browsers let users print entire HTML documents. Often, web pages contain information that the user may not want in a printed copy of the document, such as advertising banners or large pictures. Web pages may contain text, which is the same color as the background and contains keywords to improve the chances of being returned to users by a search engine.
Currently; web browsers provide the ability to select a portion of a document and to print only the selected portion. However, the layout of a web page is relative to the locations of the indicators (i.e. tags) within the page. When only a portion is selected for print, how the layout is affected is not known until the portion is actually printed. For example, if a user selects a portion of a document containing images, the user does not know how the image will fall within surrounding text until the portion is printed. To view how a selected portion of a document will look when only that portion is printed, a user must edit the document in a two step process. First, the user must cut the highlighted portion and paste it into a word processor or HTML editor. Then, the pasted portion is printed from the word processor.
Another difficulty in generating hard copies occurs with varying font sizes within a web page. Often, web pages contain text, which may be too big or too small to be printed practically.
For example, an author might make some text very large to capture the attention of the viewer. Web pages may contain disclaimers, the text of which is too small to be printed legibly. Currently, web browsers do not provide the ability to select portions of a document and to increase or decrease the font size of the selected portions. Again, to do such, a user must copy the web page to or open the web page in a word processor or HTML editor, select portions of the text by highlighting, change the font properties of the highlighted portions, and print the document from the word processor.
Web pages are authored for the purpose of display. As such, a single web page may correspond to several printed pages. This feature is frustrating when a user tries to generate a hard copy of a web page. The number of pages that will be printed and where the page breaks will fall cannot be determined until the document is actually printed. A user may unwittingly print a document, which contains far more pages than desired. Some web browsers include a “print preview” function, which displays an image of how each page will appear when printed. However, the images are often difficult to read and it is difficult to determine the subject matter on each page. The user must use “zoom” functions and navigate through the images to identify the layout of the pages. The prior art “print preview” function does not allow the user to view page break indicators within a web document as it is displayed by the web browser.